What Can It Do for You?
2024-08-06
Adi Sarid
PhD in Operations Research
CEO of Sarid Research Institute
Working in Data Science for Market Research and Consumer Insights
An R-user since ~2007
In the next 15 minutes, I will talk about how Shiny transformed our business, how we use it, and how you can too.
Shiny is a web application framework for R
You use a package (shiny) and the familiar R syntax
Shiny turns your code into an interactive web app
Benefits
The application is online (others can use it as a cloud service)
The application server has all the power of R
Your code stays secret
Doesn’t require HTML / JavaScript (almost)
We created ACME Coffee as a demonstration of some of shiny’s capabilities.
Before - data changes, but reports are static
Most of our deliveries were static PowerPoint presentations or Word documents
Simplistic dashboards based on 3rd party solutions
After - more projects, revenue increase
Deliveries include dashboards - allow us to provide ongoing data solutions
Pricing models are more diverse (cloud services)
Ability to handle complex projects (optimization, model explainability)
*This is platform agnostic, but with Shiny, the transformation was easy (same knowledge base, seamless integration).
Use shiny if…
Real-time required (e.g., pulling from database)
Application needs user input to filter/analyze dynamically
Complex visualizations that benefit from user manipulation
Model explainability (e.g., predicting no-show)
Teaching, e.g.: food consumption, population vs. sample
Experiments, e.g.: interactive learning
Don’t use it when…
Content can be conveyed through static reports/dashboard (e.g., flexdashboard)
One-off analysis not requiring interactivity
No time for development or limited deployment options
Shiny can be extremely flexible, depending on the type of deployment. Our stack includes:
Deployment on AWS EC2 with nginx OR deployment on shinyapps.io
AWS RDS MySQL for database support
AWS S3 for storage of “stuff”
AWS Cognito or customized solutions for user-secure login, if needed
An empowering tool that turns data scientists into web app developers
Short learning curve, huge benefit
Know when to use (and when not to)
Mastering Shiny by Hadley Wickham
Talk by Joe Chang about the inception of Shiny (“The Past and Future of Shiny”) from posit::conf 2022
Adi Sarid
adi@sarid-ins.com
https://www.sarid-ins.com
I’m writing a Hebrew guide book for R, freely available here: